package A02;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Random;

public class Test3 {
    public static void main(String[] args) {
        ArrayList<String > list = new ArrayList<>();
        Collections.addAll(list,"a","b","c","d");
        ArrayList<String> list2 = new ArrayList<>();
        for (int i = 0; i <10 ; i++) {
            System.out.println("----------第"+ i +"点名开始了 ");
            Random r = new Random();
            int count = list.size();
            for (int j = 0; j < count; j++) {
                int index = r.nextInt(list.size());
                String name = list.get(index);
                list.remove(name);
                list2.add(name);
                System.out.println(name);
            }
            list.addAll(list2);
            list2.clear();
        }
       
        

    }
}
